// Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
// This source file is part of the Cangjie project, licensed under Apache-2.0
// with Runtime Library Exception.
//
// See https://cangjie-lang.cn/pages/LICENSE for license information.

#ifndef CANGJIE_MIGRATOR_ACTIONS_COMMENT
#define CANGJIE_MIGRATOR_ACTIONS_COMMENT

#include <string>

#include "PositionRange.h"

namespace CangjieMigrator::Rules {

class Rule; // Only for save a pointer

} // namespace CangjieMigrator::Rules

namespace CangjieMigrator::Actions {

struct Comment {
    PositionRange range;
    std::string reference;
    std::string comment;
    const Rules::Rule *rule;

    Comment(PositionRange range, std::string comment, const Rules::Rule *rule);

    [[nodiscard]] std::string ToString() const;

    [[nodiscard]] std::string Generate() const;

    struct Message {
        Message() = delete;
        static const std::string OptionalChain;
        static const std::string VariableArgument;
    };
};

} // namespace CangjieMigrator::Actions

#endif // CANGJIE_MIGRATOR_ACTIONS_COMMENT
